<template>
  <el-table-column
      label="操作"
      :width="width || '180px'"
      :header-align="headerAlign"
      :align="align"
  >
    <template slot-scope="scope">
      <el-button
          size="mini"
          @click="patchEvent('updateEvent', scope.row)"
      >修改</el-button>
      <el-button
          size="mini"
          type="danger"
          @click="patchEvent('deleteEvent',scope.row)"
      >删除</el-button>
    </template>
  </el-table-column>
</template>

<script>
export default {
  name: "OperationEditAndDelete",
  props: {
    // 宽度
    width: {
      type: String,
      default() {
        return ''
      }
    },
    // 表头对齐方式
    headerAlign: {
      type: String,
      default() {
        return ''
      }
    },
    // 表格列对齐方式
    align: {
      type: String,
      default() {
        return 'center'
      }
    },
    patchEvent: Function
  }
}
</script>

<style scoped>

</style>
